package com.prs.crm.domain.flow;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;
import com.prs.crm.domain.hr.Person;

/**
 * 流程详细的执行结果
 * @author Administrator
 *
 */
@Entity
@Table(name="flow_processnodedetail")
public class WorkFlowProcessNodeDetail extends BaseEntity{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 4343047583336957779L;

	@Id @GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	
	@ManyToOne
	private WorkFlowProcessNode processNode;
	
	@ManyToOne
	private Person executor;
	
	private Date handleTime;//处理时间
	
	@Lob
	private String opinion;//意见
	
	@ManyToOne
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN })
	private Attachment attachment;
	
	private Integer result;


	public void setId(Integer id) {
		this.id = id;
	}


	public Integer getId() {
		return id;
	}


	public void setProcessNode(WorkFlowProcessNode processNode) {
		this.processNode = processNode;
	}


	public WorkFlowProcessNode getProcessNode() {
		return processNode;
	}


	public void setHandleTime(Date handleTime) {
		this.handleTime = handleTime;
	}


	public Date getHandleTime() {
		return handleTime;
	}


	public void setOpinion(String opinion) {
		this.opinion = opinion;
	}


	public String getOpinion() {
		return opinion;
	}




	public void setExecutor(Person executor) {
		this.executor = executor;
	}


	public Person getExecutor() {
		return executor;
	}


	public void setResult(Integer result) {
		this.result = result;
	}


	public Integer getResult() {
		return result;
	}


	public void setAttachment(Attachment attachment) {
		this.attachment = attachment;
	}


	public Attachment getAttachment() {
		return attachment;
	}
}
